import axios from "axios";
const request = axios.create({
  //配置基础请求的路径
  baseURL: import.meta.env.VITE_APP_BASE_API,
});

export function proList(namekw) {
  return request.post("productList/list", {
    cp: "1", //当前页
    ls: "5", //每页的数据长度
    namekw, //根据名字进行模糊查询的条件
    status: "0", //是否上架（0是上架，1是未上架）
  });
}

export function proSave(totalName) {
  return request.post("productList/list", {
    totalName,

    urlImage: "nullurl",

    content: "感冒药之类的",
  });
}
export function proUpda(id,totalName,) {
  return request.post("productList/updateById", {
    id,

    totalName,

    urlImage: "nullurl",

    createTime: "2022-12-17 14:39:45",

    updateTime: "2022-12-24 14:39:45",

    content:"",
  });
}
